#ifndef YOOHOO_XMPPCORE_JABBERID_H
#define YOOHOO_XMPPCORE_JABBERID_H

#include "xmppcore/export.h"

#include <QtCore/QString>

namespace yoohoo_xmppcore {

class YOOHOO_XMPPCORE_EXPORT JabberId {
public:
	JabberId(QString domain = QString());
	JabberId(QString node, QString domain);
	JabberId(QString node, QString domain, QString resource);
	JabberId(const JabberId& other);

	void setNode(QString node);
	QString node() const;
	void setDomain(QString domain);
	QString domain() const;
	void setResource(QString resource);
	QString resource() const;
	QString toString() const;
	bool fromString(const QString& jidString);
	QString bareId() const;
	bool operator==(const JabberId& other);
	bool operator!=(const JabberId& other);

private:
	QString _node;
	QString _domain;
	QString _resource;
};

}

#endif
